$(function () {
    var width = $(window).width();
    var height = $(window).height();

    $('.content').css({
        width: width,
        height: height,
        overflow: 'hidden'
    });

    var actNum = 0;
    var $contents = $('.content');
    var cList = [];
    console.log($contents);
    $.each($contents, function (i, elm) {
        cList.push({
            $elm: $(elm)
        });
    });

    setInterval(function () {
        var prevActNum = actNum;
        actNum++;
        if (actNum == cList.length) {
            actNum = 0;
        }
        cList[prevActNum].$elm.removeClass('active');
        cList[actNum].$elm.addClass('active');
    }, 8000);

});